/*********************************************************************
 *
 * Copyright (C) 2004,  Blekinge Institute of Technology
 *
 * Filename:      levels.h
 * Author:        Simon Kagstrom <ska@bth.se>
 * Description:   Level data
 *
 * $Id: levels.h 6872 2006-03-02 09:29:54Z ska $
 *
 ********************************************************************/
#include "sokoban.h" /* The types used in this file */

#define N_LEVELS 2

static int level_1[] =
  {
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 3, 2, 1, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 1,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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2,
    2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2,
    2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2,
    2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  };

static ball_t level_1_balls[] =
  {
    /* The .x = ... is a GNU GCC extension */
    {.x = 2, .y = 2},  /* The sprite_slot is set in the game */
    {.x = 3, .y = 3},
    {.x = 5, .y = 12},
  };

static ball_t level_2_balls[] =
  {
    {.x = 2, .y = 6},  /* The sprite_slot is set in the game */
    {.x = 13, .y = 15},
    {.x = 7, .y = 11},
  };



/* The level definitions */
static level_t levels[] =
  {
    { /* Level 1 */
      .p_level_data = level_1,
      .w = 18,
      .h = 22,
      .n_balls = 3,
      .p_balls = level_1_balls,
      .player_x = 1,
      .player_y = 1,
    },
    { /* Level 2 */
      .p_level_data = level_2,
      .w = 16,
      .h = 20,
      .n_balls = 3,
      .p_balls = level_2_balls,
      .player_x = 1,
      .player_y = 1,
    },
  };
